﻿<UserControl x:Class="StatusBarView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="25" d:DesignWidth="300">


    <StatusBar Background="{Binding Status, Converter={StaticResource StateToStatusBarColor}, Mode=OneWay}" >
        <StatusBar.ItemsPanel>
            <ItemsPanelTemplate>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="4*"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                </Grid>
            </ItemsPanelTemplate>
        </StatusBar.ItemsPanel>

        <StatusBarItem>
            <Grid>
                <Rectangle Grid.Column="0" Fill="White" Width="12" Height="12" Visibility="{Binding SyncEnable,Converter={StaticResource BoolToVisiblity}}">
                    <Rectangle.OpacityMask>
                        <VisualBrush Visual="{StaticResource appbar_disconnect}"/>
                    </Rectangle.OpacityMask>
                </Rectangle>
                <Rectangle Grid.Column="0" Fill="White" Width="12" Height="12" Visibility="{Binding SyncEnable,Converter={StaticResource BoolToVisiblity},ConverterParameter=True}">
                    <Rectangle.OpacityMask>
                        <VisualBrush Visual="{StaticResource appbar_network}"/>
                    </Rectangle.OpacityMask>
                </Rectangle>
            </Grid>
        </StatusBarItem>
        <StatusBarItem Grid.Column="1">
                           
            <TextBlock Text="{Binding Status,Converter={StaticResource StateToStatusDescription}}"/>
        </StatusBarItem>

        
        
        
    </StatusBar>

</UserControl>
